// import com.alibaba.druid.sql.ast.SQLDataType;
// import com.alibaba.druid.sql.ast.SQLExpr;
// import com.alibaba.druid.sql.ast.SQLName;
// import com.alibaba.druid.sql.ast.SQLParameter;
// import com.alibaba.druid.sql.ast.statement.SQLCreateStatement;
// import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;

// import java.util.ArrayList;
// import java.util.List;

#include "OracleCreateTypeStatement.h"
#include "../../../../ast/SQLDataType.h"
#include "../../../../ast/SQLExpr.h"
#include "../../../../ast/SQLName.h"
#include "../../../../ast/SQLParameter.h"
#include "../../visitor/OracleASTVisitor.h"
#include "../../../../../utils/listTran.h"

OracleCreateTypeStatement::OracleCreateTypeStatement()
{
  parameters = std::make_shared<std::list<SQLParameter_ptr>>();
}

// @Override
void OracleCreateTypeStatement::accept0(OracleASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(OracleCreateTypeStatement)))
  {
    acceptChild(visitor, name);
    acceptChild(visitor, authId);
    acceptChild(visitor, oid);
    acceptChild(visitor, under);
    SQLObject_list_ptr tmp1 = ListTran::tran_class<SQLParameter, SQLObject>(parameters);
    acceptChild(visitor, tmp1);
    acceptChild(visitor, tableOf);
    acceptChild(visitor, varraySizeLimit);
    acceptChild(visitor, varrayDataType);
  }
  visitor->endVisit(SharedObject(OracleCreateTypeStatement));
}

SQLName_ptr OracleCreateTypeStatement::getName()
{
  return name;
}

void OracleCreateTypeStatement::setName(SQLName_ptr name)
{
  if (name != nullptr)
  {
    name->setParent(SharedObject(OracleCreateTypeStatement));
  }
  this->name = name;
}

BOOL_ptr OracleCreateTypeStatement::isOrReplace()
{
  return orReplace;
}

void OracleCreateTypeStatement::setOrReplace(BOOL_ptr orReplace)
{
  this->orReplace = orReplace;
}

BOOL_ptr OracleCreateTypeStatement::isForce()
{
  return force;
}

void OracleCreateTypeStatement::setForce(BOOL_ptr force)
{
  this->force = force;
}

SQLName_ptr OracleCreateTypeStatement::getOid()
{
  return oid;
}

void OracleCreateTypeStatement::setOid(SQLName_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(OracleCreateTypeStatement));
  }
  this->oid = x;
}

SQLName_ptr OracleCreateTypeStatement::getAuthId()
{
  return authId;
}

void OracleCreateTypeStatement::setAuthId(SQLName_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(OracleCreateTypeStatement));
  }
  this->authId = x;
}

SQLParameter_list_ptr OracleCreateTypeStatement::getParameters()
{
  return parameters;
}

BOOL_ptr OracleCreateTypeStatement::isBody()
{
  return body;
}

void OracleCreateTypeStatement::setBody(BOOL_ptr body)
{
  this->body = body;
}

BOOL_ptr OracleCreateTypeStatement::getFinal()
{
  return isFinal;
}

void OracleCreateTypeStatement::setFinal(BOOL_ptr aFinal)
{
  isFinal = aFinal;
}

BOOL_ptr OracleCreateTypeStatement::getInstantiable()
{
  return instantiable;
}

void OracleCreateTypeStatement::setInstantiable(BOOL_ptr instantiable)
{
  this->instantiable = instantiable;
}

SQLDataType_ptr OracleCreateTypeStatement::getTableOf()
{
  return tableOf;
}

void OracleCreateTypeStatement::setTableOf(SQLDataType_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(OracleCreateTypeStatement));
  }
  this->tableOf = x;
}

SQLExpr_ptr OracleCreateTypeStatement::getVarraySizeLimit()
{
  return varraySizeLimit;
}

void OracleCreateTypeStatement::setVarraySizeLimit(SQLExpr_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(OracleCreateTypeStatement));
  }
  this->varraySizeLimit = x;
}

SQLDataType_ptr OracleCreateTypeStatement::getVarrayDataType()
{
  return varrayDataType;
}

void OracleCreateTypeStatement::setVarrayDataType(SQLDataType_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(OracleCreateTypeStatement));
  }
  this->varrayDataType = x;
}

SQLName_ptr OracleCreateTypeStatement::getUnder()
{
  return under;
}

void OracleCreateTypeStatement::setUnder(SQLName_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(OracleCreateTypeStatement));
  }
  this->under = x;
}

BOOL_ptr OracleCreateTypeStatement::isObject()
{
  return object;
}

void OracleCreateTypeStatement::setObject(BOOL_ptr object)
{
  this->object = object;
}

BOOL_ptr OracleCreateTypeStatement::isParen()
{
  return paren;
}

void OracleCreateTypeStatement::setParen(BOOL_ptr paren)
{
  this->paren = paren;
}

string_ptr OracleCreateTypeStatement::getWrappedSource()
{
  return wrappedSource;
}

void OracleCreateTypeStatement::setWrappedSource(string_ptr wrappedSource)
{
  this->wrappedSource = wrappedSource;
}
